package com.xmy.cultivate.service;

import com.xmy.cultivate.entity.AuditFlow;
import com.baomidou.mybatisplus.extension.service.IService;
import com.xmy.cultivate.entity.AuditFlowSet;
import com.xmy.cultivate.respons.FlowDetailRs;
import com.xmy.cultivate.respons.FlowRs;
import com.xmy.cultivate.util.Result;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * <p>
 * 实例审核流程详情 服务类
 * </p>
 *
 * @author hpiggy
 * @since 2025-01-01
 */
public interface IAuditFlowService extends IService<AuditFlow> {


    List<FlowRs> getFlowTask(Long flowId, Long schoolId, Long departId, Long adminId);

    List<AuditFlowSet> getFlowTaskForAdd(Long flowId, Long schoolId, Long departId, Long adminId);

    FlowDetailRs getFlowTaskForDetail(Long sourseId);

    boolean addFlowTask(Long sourseId, Long flowId, Long schoolId, Long departId, Long adminId);

    @Transactional
    Result  completeTask(Long sourseId, Long teacherId);

    Result refuseTask(Long sourseId, Long teacherId);

    Result taskDo(Long sourseId, Long teacherId, Integer status);
}
